package upbeat.jmusiclib;

import java.util.LinkedList;

import upbeat.types.Measure;

public interface JMusicWrapperInterface {

	/**
	 * Used by the Manager class to pass a new measure of music to JMusic. At
	 * the moment, this should just be appended onto the end of a MIDI file.
	 * Eventually, we'll want to add in another method for actually playing this
	 * stuff in real time.
	 * 
	 * @param newMeasure
	 *            This is a linked list containing a bunch of measures. The
	 *            measures of music in newMeasure should be played
	 *            <i>simultaneously</i>. Thus, even though there may be many
	 *            {@link Measure} objects passed to AppendNextMeasure, they only
	 *            actually produce one measure of music in the final song.
	 */
	public void AppendNextMeasure(LinkedList<Measure> newMeasure);

	/**
	 * Plays the song that has been built up through JMusic
	 */
	public void play();

	/**
	 * Return the length of an input file in measures
	 * 
	 * @param fileName
	 *            The name of the file to count measures in
	 */
	public int length(String fileName);

	/**
	 * Sets the tempo for generated music
	 * 
	 * @param tempo
	 *            The tempo to generate/play the music at.
	 */
	public void setTempo(int tempo);
}
